﻿using System;
using System.Windows.Controls;

namespace KineticListViewTest
{
    /// <summary>
    /// Interaction logic for ListOfElements.xaml
    /// </summary>
    public partial class ListOfElements : UserControl
    {
        public ListOfElements()
        {
            InitializeComponent();
            DataContext = new ListOfElementViewModel();
        }

        public Object GetContent()
        {
            var cnt = Content;
            this.RemoveLogicalChild(Content);
            return cnt;
        }

        private void listView1_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            e.Handled = true;
            ((ListView) sender).SelectedValue = null;
        }
    }
}
